<?php session_start() ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Adopt a Kitten from the Kalamazoo Animal Rescue</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">



<? include("./includes/head.inc");  ?>

<style type="text/css">
<!--
.style1 {
	font-size: 18px;
	font-weight: bold;
	color: #000000;
}
-->
</style>
</head>

<body>
<div id="bodywidth">

<? include("./includes/header.inc");  ?>
<? include("./includes/leftmenu.inc");  ?>

<div id="wide2column">

<BR>

<CENTER><H2>Adoptable Kittens</H2></CENTER>

<BR>

<b>Please fill out our <A HREF="http://02d2e0a.netsolhost.com/forms/catadopt.php">online application form</A> if you are interested in adopting a cat or kitten. <b><font color = #ff00ff>Please be patient with us. We are all volunteers who donate our time.</font></b><BR><BR>

For information on declawing, please read <A HREF="http://02d2e0a.netsolhost.com/declaw.htm">KAR's declaw statement.</A> </b><br />

<BR><BR>

<p style="margin-left:20px;font-size:124%;font-weight:bold;">
Select the picture for a larger image and detailed description.
</p>
<BR>
<?php

include("./includes/db.php");
include("./includes/count.php");
				// Connect to the database server
dbConnect('kar_web1');   	// Use function in db.php to connect


$numresults = @mysql_query("SELECT * FROM cats WHERE
						pet_status='v' AND 
						TO_DAYS(NOW()) - TO_DAYS(pet_DOB) <= 365");
if (!$numresults) {	
  echo("<p>Error performing query in Display Pets page: " . mysql_error() . "</p>");
  exit();
}

$num_to_display=20;  			//  how many animals we want displayed per page
$num_columns=5;				// how many columns we want those split between

$num_pets=mysql_num_rows($numresults); // how many total animals are actually available

if (empty($starting_num)){	// if this is our first page, then start at 0
	$starting_num=0;
} //  end if

$result = @mysql_query("SELECT * FROM cats WHERE pet_status='v' AND 
 				   TO_DAYS(NOW()) - TO_DAYS(pet_DOB) <= 365
				   LIMIT $starting_num,$num_to_display");

$count =mysql_num_rows($result);  // how many we have for this page
displayPageLinks($num_pets, $num_to_display, $starting_num, cats, 0);

for ($i = 1; $i <= $count; $i++ ) {    	// loop for number of animals in this set
	$pet_record = mysql_fetch_array($result);
	$temp_id = $pet_record["tagNum"];
	$name = $pet_record["pet_name"];
	$special = $pet_record["spec_need"];
	$declawed = $pet_record["declawed"];
	$noPhotos = $pet_record["noPhotos"];
	//  Query Pet Photos separately in case there is not a record of photos for this pet
	$pics = @mysql_query("SELECT thumb, pic1, pic2, pic3 FROM cats WHERE tagNum ='$temp_id'");
	$pet_pics = mysql_fetch_array($pics);

	if ($noPhotos) {
		$thumb = 'noPhotos.gif';	// this file is in both the dog and cat thumbnail folders
		} else {
		$thumb = $pet_pics["thumb"];
		}

	$path = "http://02d2e0a.netsolhost.com/images/cats/thmbnail/";
	$type = "cat";

		echo ("<div class =\"float\">");   // no matter what start with this

	// display pet thumbnail image and name
	echo("<a href='http://02d2e0a.netsolhost.com/pets2.php?displaypet=$temp_id'><img SRC=\"". $path . $thumb . "\" align=\"$align\"  alt=\"$name\" width=\"75\" height=\"75\"></a>" );

 	echo("<BR><p>");

	if ($declawed=='1'):		// declawed
		echo("<img SRC=\"http://02d2e0a.netsolhost.com/images/declawed.gif\"  HSPACE=0 ALIGN=\"TOP\" WIDTH=\"19\" HEIGHT=\"19\" ALT=\"Declawed\">");
	endif;
	
	echo($name . "</p></div>");


	if ( ($i%$num_columns) == 0):	// if it's the last slot in the row, end the row
		echo("<div class=\"clearit\"></div>");
	endif;
  }  // end for 

	echo("<div class=\"clearit\"></div>");

displayPageLinks($num_pets, $num_to_display, $starting_num, cats, 0);

?>
<!-- <BR>
<img SRC="http://02d2e0a.netsolhost.com/images/sneed3.gif"  HSPACE=0 ALIGN="TOP" WIDTH="17" HEIGHT="17" ALT="Special Needs"> -- Special Needs -->
<BR>
<img SRC="http://02d2e0a.netsolhost.com/images/declawed.gif"  HSPACE=0 ALIGN="TOP" WIDTH="19" HEIGHT="19" ALT="Declawed"> -- Declawed
<BR>

<CENTER>
  <p>Don't forget to check out the <a href="cats.php">ADULT</a> and <a href="http://02d2e0a.netsolhost.com/sccCats.htm">SENIOR </a>pages too!</p>
  <p>&nbsp;</p>
  <p><span class="style1">KAR may have more kittens than are shown here.</span></p>
  <p><span class="style1">Fill   out the <a href="http://02d2e0a.netsolhost.com/forms/catadopt.php">online application form</a> to be contacted   about a possible purrrfect match for you.</span></p>
  <p><BR>
  </p>
</CENTER>
<BR>

</div>

<? include("./includes/footer.inc");  ?>

<!--tag below ends bodywidth div -->
</div>
</body>
</html>

